﻿@model FashionWebsite.Models.Product

@using FashionWebsite
@using FashionWebsite.Models

@{
    //ViewBag.Title = "Index";
    //Layout = "~/Views/Shared/_AdminLayout.cshtml";
    Layout = null;
    var category = (List<Category>)ViewBag.listProductCatelogy;
    var color = (List<Color>)ViewBag.listColor;
    var size = (List<Size>)ViewBag.listSize;
    var producer = (List<Producer>)ViewBag.listProducer;
  
}

<!DOCTYPE html>

<html>
<head>
    <title>Create</title>
</head>
<body>
    <script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    @using (Html.BeginForm()) {
        @Html.ValidationSummary(true)
        @*<div class="m">
        <div class="toolbar-list" id="toolbar">
            <ul><li class="button" id="toolbar-apply"><a href="http://vsw-demo.allproject.net/CP/ModNews/Add.aspx#" onclick="vsw_exec_cmd(&#39;apply&#39;)" class="toolbar"><span class="icon-32-apply" title="Lưu"></span>Lưu </a></li><li class="button" id="toolbar-save"><a href="http://vsw-demo.allproject.net/CP/ModNews/Add.aspx#" onclick="vsw_exec_cmd(&#39;save&#39;)" class="toolbar"><span class="icon-32-save" title="Lưu  &amp; đóng"></span>Lưu  &amp; đóng </a></li><li class="button" id="toolbar-save-new"><a href="http://vsw-demo.allproject.net/CP/ModNews/Add.aspx#" onclick="vsw_exec_cmd(&#39;save-new&#39;)" class="toolbar"><span class="icon-32-save-new" title="Lưu &amp; thêm"></span>Lưu &amp; thêm </a></li><li class="divider"></li><li class="button" id="toolbar-cancel"><a href="http://vsw-demo.allproject.net/CP/ModNews/Add.aspx#" onclick="vsw_exec_cmd(&#39;cancel&#39;)" class="toolbar"><span class="icon-32-cancel" title="Đóng"></span>Đóng </a></li></ul>
        </div>
        <div class="pagetitle icon-48-article">
            <h2>Bài viết  : Thêm mới</h2>
        </div>
        <div class="clr"></div>
    </div>*@
            <fieldset>
                
            <legend>Product</legend>
            <div class="editor-label">
                
                @Html.LabelFor(model => model.Code)
            </div>
            <div class="editor-field">
               
                @Html.EditorFor(model => model.Code)
                @Html.ValidationMessageFor(model => model.Code)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ProductName)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ProductName)
                @Html.ValidationMessageFor(model => model.ProductName)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.CategoryId)
            </div>
            <div class="editor-field">
                @Html.DropDownList("CategoryId", new SelectList(category, "CategoryId", "CategoryName"), new { name = "CategoryId" })
                @Html.ValidationMessageFor(model => model.CategoryId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Price)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Price)
                @Html.ValidationMessageFor(model => model.Price)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.State)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.State)
                @Html.ValidationMessageFor(model => model.State)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ColorId)
            </div>
            <div class="editor-field">
                @Html.DropDownList("ColorId", new SelectList(color, "ColorId", "ColorName"), new { name = "ColorId" })
                @Html.ValidationMessageFor(model => model.ColorId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.TypeId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.TypeId)
                @Html.ValidationMessageFor(model => model.TypeId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Viewer)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Viewer)
                @Html.ValidationMessageFor(model => model.Viewer)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.SaleAmount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SaleAmount)
                @Html.ValidationMessageFor(model => model.SaleAmount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.ProducerId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.ProducerId)
                @Html.ValidationMessageFor(model => model.ProducerId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Amount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Amount)
                @Html.ValidationMessageFor(model => model.Amount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.SizeId)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.SizeId)
                @Html.ValidationMessageFor(model => model.SizeId)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Status)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Status)
                @Html.ValidationMessageFor(model => model.Status)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Discount)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Discount)
                @Html.ValidationMessageFor(model => model.Discount)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.EntryLinks)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.EntryLinks)
                @Html.ValidationMessageFor(model => model.EntryLinks)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Keys)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Keys)
                @Html.ValidationMessageFor(model => model.Keys)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Rate)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Rate)
                @Html.ValidationMessageFor(model => model.Rate)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.UrlImage)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.UrlImage)
                @Html.ValidationMessageFor(model => model.UrlImage)
            </div>
    
            <div class="editor-label">
                @Html.LabelFor(model => model.Priority)
            </div>
            <div class="editor-field">
                @Html.EditorFor(model => model.Priority)
                @Html.ValidationMessageFor(model => model.Priority)
            </div>
    
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>
    }
    
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
  
<!--add -->






<!--noi dung-->


</body>
</html>
